import request from '@/utils/request'

// 查询分类列表
export function listDClassify(query) {
  return request({
    url: '/video/DClassify/list',
    method: 'get',
    params: query
  })
}

//查询一级分类集合
export function listDClassifyVo(query) {
  return request({
    url: '/video/DClassify/getlist',
    method: 'get',
    params: query
  })
}

// 根据父级ID 查询子集合
export function getlistByPid(pid) {
  return request({
    url: '/video/DClassify/getlistByPid/' + pid,
    method: 'get'
  })
}



// 查询分类详细
export function getDClassify(id) {
  return request({
    url: '/video/DClassify/' + id,
    method: 'get'
  })
}

// 新增分类
export function addDClassify(data) {
  return request({
    url: '/video/DClassify',
    method: 'post',
    data: data
  })
}

// 修改分类
export function updateDClassify(data) {
  return request({
    url: '/video/DClassify',
    method: 'put',
    data: data
  })
}

// 删除分类
export function delDClassify(id) {
  return request({
    url: '/video/DClassify/' + id,
    method: 'delete'
  })
}

//批量启用，禁用分类
export function updateDClasStatus(data) {
  return request({
    url: '/video/DClassify/enableBach',
    method: 'put',
    data: data
  })
}
